﻿@{
    var cates = ViewBag.Cates as List<CategoryModel>;
    var ckIds = ViewBag.ids as List<string>;
    if (cates != null && cates.Count > 0)
    {
        foreach (var c in cates)
        {
            if (ckIds != null && ckIds.Contains(c.ID.ToString()))
            {
                <span><input type="checkbox" value="@c.ID" checked="checked" />@(c.CategoryName)</span>
            }
            else
            {
                <span><input type="checkbox" value="@c.ID" />@(c.CategoryName)</span>
            }
        }
    }
    else
    {
        <span style="margin-left:10px; font-size:12px;color:Olive">
            暂无分类哦，去
            <a style="text-decoration:underline;" href="javascript:;" onclick="showCateTab()">添加</a>
        </span>
    }
}